package com.somsoft.handjc.activity.setting;

import java.util.HashMap;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;

import com.somsoft.handjc.activity.BaseGridViewActivity;
import com.somsoft.handjc.activity.R;
import com.somsoft.handjc.activity.query.QueryActivity;
import com.somsoft.handjc.util.MyApplication;

@SuppressWarnings("all")
public class SettingActivity extends BaseGridViewActivity {

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyApplication.getInstance().addActivity(this);
		setContentView(R.layout.gridview);
		GridView gridview = (GridView) findViewById(R.id.gridview);
		Integer[] pics = {R.drawable.setip, R.drawable.changepwd};
		String[] titles = {"设置IP","修改\n密码"};
		super.createGridView(gridview,pics,titles);
	}

	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
		Intent it = null;
		switch (arg2) {
		case 0:
			it = new Intent(SettingActivity.this,SetIpActivity.class);
			break;
		case 1:
			it = new Intent(SettingActivity.this,ChangePwdActivity.class);
			break;
		}
		if(it != null){
			startActivity(it);
		}
	}
}